Skip to main content

Shortlist

Three different strategies are used to shortlist stocks. df is the dataframe contaning all the features that was made earlier.

Risky but rewarding

This strategy looks at only the regression score and shortlists the top ones, allocating budget proportional to the score.

shortlist1 = df[df.score > 30]

This does not look at any other factors, so it could be that the technical indicators of MACD and MACD signal do not suggest to buy at this point, current price is in fact greater than Graham Number and/or Altman Z Score/Piotroski Score indicate the company is fundamentally weak, so this is highly risky.

But this does provide the highest estimated returns of 33.29% on average.

Moderately risky and moderately rewarding

This strategy filters only those stocks whose current price is lower than Graham Number and MACD is higher than MACD signal, i.e., the technical indicators suggest buying the stock. It then filters further with regression score greater than 15.

shortlist2 = df[(df["Current Price"] < df["Graham"]) & (df["MACD"] > df["MACD Signal"]) & (df["score"] > 15)]

These stocks are good for daily trading and have decent growth of 17.76%, but they might not be good for long-term investing because we haven't checked the Altman Z Score and Piotroski Score to verify their fundamental health.

Hence, these are moderately risky and moderately rewarding.

Safe and low rewards

This strategy considers all factors and scores. Altman Z Score must be greater than 3 and Piotroski Score must be at least 8 which indicate strong financial health, Current Price must be lower than Graham Number which indicates stock is undervalued and MACD must be higher than its Signal which indicates stock should be bought at this point.

Thereafter, score is filtered to positive and stocks are shortlisted.

shortlist3 = df[(df["Altman Z Score"] > 3) & (df["Piotroski score"] >= 8) & (df["Graham"] > df["Current Price"]) & (df["MACD"] > df["MACD Signal"]) & (df["score"] > 0)]

This is an extremely safe shortlist since these stocks are good for both long-term investment and short-term trading, but the estimated return is only 10.38%.

Final

As a final shortlisting strategy, the regression score, MACD/MACD Signal and Graham Number/Current Price are all taken to give a cumulative score.

df["cumulative"] = df["score"] + df["MACD"] - df["MACD Signal"] + 0.1 * (df["Graham"] - df["Current Price"])
shortlist4 = df[df["score"] > 0].sort_values(by="cumulative", ascending=False).iloc[:20, :]

Thw weights given to MACD/MACD Signal and Graham Number/Current Price as well as the portfolio size are arbitrary at this point and will be optimized later.

This is the most balanced shortlist.